<?php
/*
# ------------------------------------------------------------------------
# JA Job Board Package
# ------------------------------------------------------------------------
# Copyright (C) 2004-2010 JoomlArt.com. All Rights Reserved.
# @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
# Author: JoomlArt.com
# Websites: http://www.joomlart.com - http://www.joomlancers.com.
# ------------------------------------------------------------------------
*/

// Check permission functions

// Check download permission
function checkDownloadPermission($type){
    // Get current User
    $user = JFactory::getUser();   
    
    // Check login user.
    if ( $user->id==0 ){        
    	return "You must login to download document";
    }else {    	
        if ( ! in_array( getCurrentUserType($user->id), $type) ){
           return "You must login to download document";
        }else{
            return "";
        }
    }
    
    return "";
}

?>